package com.zhizihua.content.api;

import com.zhizihua.content.model.dto.CourseCategoryTreeDto;
import com.zhizihua.content.service.CourseCategoryService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: 课程分类相关接口
 * @author: zhizihua
 * @Email 2876290193@qq.com
 * @date: 2025/5/7
 */
@Slf4j
@Api(value = "课程分类相关接口", tags = "课程分类相关接口")
@RestController
public class CourseCategoryController {

    @Autowired
    private CourseCategoryService courseCategoryService;

    /**
     * 查询课程分类树形结构
     * @return
     */
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes() {
        return courseCategoryService.queryTreeNodes("1");

    }
}
